﻿<UserControl
   x:Class="SoftTeach.View.Sitzpläne.SitzplanDetailView"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:softTeach="clr-namespace:SoftTeach"
  xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
  mc:Ignorable="d"
  d:DesignWidth="800" d:DesignHeight="600">
  <UserControl.Resources>
  </UserControl.Resources>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="200"/>
      <RowDefinition Height="*" MinHeight="500"/>
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0" Orientation="Horizontal"  Background="{x:Static SystemColors.MenuBarBrush}">
      <TextBox  Margin="3"  Style="{StaticResource HeaderTextBox}" TabIndex="1"  VerticalAlignment="Center" MinWidth="200" Text="{Binding SitzplanBezeichnung}"/>
      <Label  Content="Raum auswählen" VerticalAlignment="Center"/>
      <ComboBox Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Raumpläne}"
                SelectedItem="{Binding Path=SitzplanRaumplan}"/>
      <Label  Content="Schülerliste auswählen" VerticalAlignment="Center"/>
      <ComboBox Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                ItemsSource="{Binding Path=SchülerlistenView}"
                SelectedItem="{Binding Path=SitzplanSchülerliste}"/>
      <Border BorderThickness="1" Margin="5" BorderBrush="{x:Static SystemColors.ControlDarkDarkBrush}" />
      <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding ShuffleCommand}" 
				ToolTip="Neuen Grundriss laden">
        <StackPanel Orientation="Horizontal">
          <Grid>
            <Image Source="/SoftTeach;component/Images/Raumplan32.png"/>
            <Image Source="/SoftTeach;component/Images/FolderOpen16.png" Width="16" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
          </Grid>
          <Label Padding="5,0,0,0" VerticalContentAlignment="Center" Content="Neuen Grundriss laden (800x500px, 96dpi)"/>
        </StackPanel>
      </Button>
    </StackPanel>
    <ListBox Grid.Row="1"
                 ItemsSource="{Binding Path=SitzplanSchülerliste.SchülereinträgeView}"             
                 BorderThickness="0"
                 Name="SchülerListBox"
                 ItemTemplate="{StaticResource KlassenlisteHausaufgabenView}"
                 ItemContainerStyle="{StaticResource UnselectableListBoxItem}">
      <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
          <WrapPanel Width="{Binding ElementName=SchülerListBox, Path=ActualWidth, Converter={StaticResource WrapPanelWidthConverter}}"/>
        </ItemsPanelTemplate>
      </ListBox.ItemsPanel>
    </ListBox>
    <Canvas x:Name="SitzplanCanvas" Width="800" Height="500"
      Background="{x:Static SystemColors.ControlDarkBrush}"
			Grid.Row="2" >
      <Image Source="{Binding SitzplanRaumplan.RaumplanImage}" Stretch="None" />
    </Canvas>
  </Grid>
</UserControl>
